// DriveNotes. Copyright (c) 2011, Andrei Senchuk. All rights reserved.
package net.taviscaron.drivenotes.server.core;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * SpringContextHelper initialize and store ApplicationContext
 * @author taviscaron
 */
public class SpringContextHelper {
    private static final SpringContextHelper instance =
            new SpringContextHelper();

    private final ApplicationContext applicationContext;

    private SpringContextHelper() {
        applicationContext = new ClassPathXmlApplicationContext(
                ServerConstants.SPRING_XML_CONFIG);
    }

    public static ApplicationContext getContext() {
        return instance.applicationContext;
    }
}
